home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / AUTOCK.PAK / AUTODRIV.FRM
Text File  |  1997-05-06  |  6KB  |  223 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "AutoClik Test Driver"
  4.    ClientHeight    =   2895
  5.    ClientLeft      =   1845
  6.    ClientTop       =   1620
  7.    ClientWidth     =   5100
  8.    Height          =   3300
  9.    Left            =   1785
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   2895
  12.    ScaleWidth      =   5100
  13.    Top             =   1275
  14.    Width           =   5220
  15.    Begin CommandButton SetPosition 
  16.       Caption         =   "Set P&osition"
  17.       Height          =   375
  18.       Left            =   240
  19.       TabIndex        =   9
  20.       Top             =   1560
  21.       Width           =   1335
  22.    End
  23.    Begin CommandButton GetPosition 
  24.       Caption         =   "Get &Position"
  25.       Height          =   375
  26.       Left            =   240
  27.       TabIndex        =   10
  28.       Top             =   2280
  29.       Width           =   1335
  30.    End
  31.    Begin CommandButton AnimateXY 
  32.       Caption         =   "&Animate X && Y"
  33.       Height          =   375
  34.       Left            =   3360
  35.       TabIndex        =   14
  36.       Top             =   1800
  37.       Width           =   1575
  38.    End
  39.    Begin CommandButton AnimatePosition 
  40.       Caption         =   "A&nimate Position"
  41.       Height          =   375
  42.       Left            =   3360
  43.       TabIndex        =   15
  44.       Top             =   2280
  45.       Width           =   1575
  46.    End
  47.    Begin CommandButton RefreshDisplay 
  48.       Caption         =   "&Refresh Display"
  49.       Height          =   375
  50.       Left            =   3360
  51.       TabIndex        =   13
  52.       Top             =   1320
  53.       Width           =   1575
  54.    End
  55.    Begin CommandButton SetAll 
  56.       Caption         =   "&Set All"
  57.       Height          =   375
  58.       Left            =   1680
  59.       TabIndex        =   11
  60.       Top             =   1560
  61.       Width           =   1335
  62.    End
  63.    Begin CommandButton GetAll 
  64.       Caption         =   "&Get All"
  65.       Default         =   -1  'True
  66.       Height          =   375
  67.       Left            =   1680
  68.       TabIndex        =   12
  69.       Top             =   2280
  70.       Width           =   1335
  71.    End
  72.    Begin CommandButton SetText 
  73.       Caption         =   "Set &Text"
  74.       Height          =   375
  75.       Left            =   1680
  76.       TabIndex        =   8
  77.       Top             =   1080
  78.       Width           =   1335
  79.    End
  80.    Begin CommandButton SetY 
  81.       Caption         =   "Set &Y"
  82.       Height          =   375
  83.       Left            =   960
  84.       TabIndex        =   7
  85.       Top             =   1080
  86.       Width           =   615
  87.    End
  88.    Begin CommandButton SetX 
  89.       Caption         =   "&Set &X"
  90.       Height          =   375
  91.       Left            =   240
  92.       TabIndex        =   6
  93.       Top             =   1080
  94.       Width           =   615
  95.    End
  96.    Begin TextBox Text 
  97.       Height          =   375
  98.       Left            =   1680
  99.       TabIndex        =   5
  100.       Top             =   480
  101.       Width           =   1335
  102.    End
  103.    Begin TextBox Y 
  104.       Height          =   375
  105.       Left            =   960
  106.       TabIndex        =   4
  107.       Top             =   480
  108.       Width           =   615
  109.    End
  110.    Begin TextBox X 
  111.       Height          =   375
  112.       Left            =   240
  113.       TabIndex        =   3
  114.       Top             =   480
  115.       Width           =   615
  116.    End
  117.    Begin CommandButton Close 
  118.       Caption         =   "&Close"
  119.       Height          =   375
  120.       Left            =   3360
  121.       TabIndex        =   16
  122.       Top             =   480
  123.       Width           =   1575
  124.    End
  125.    Begin Label Label3 
  126.       Caption         =   "&Text"
  127.       Height          =   255
  128.       Left            =   1680
  129.       TabIndex        =   2
  130.       Top             =   240
  131.       Width           =   1335
  132.    End
  133.    Begin Label Label2 
  134.       Caption         =   "&Y"
  135.       Height          =   255
  136.       Left            =   960
  137.       TabIndex        =   1
  138.       Top             =   240
  139.       Width           =   615
  140.    End
  141.    Begin Label Label1 
  142.       Caption         =   "&X"
  143.       Height          =   255
  144.       Left            =   240
  145.       TabIndex        =   0
  146.       Top             =   240
  147.       Width           =   1215
  148.    End
  149. End
  150. Dim clik As object
  151. Dim pos As object
  152.  
  153. Sub AnimatePosition_Click ()
  154.     Set pos = clik.position
  155.     For i = 10 To 100 Step 5
  156.         pos.X = i
  157.         pos.Y = i
  158.         Set clik.position = pos
  159.         DoEvents
  160.     Next i
  161. End Sub
  162.  
  163. Sub AnimateXY_Click ()
  164.     For i = 10 To 100 Step 5
  165.         clik.X = i
  166.         clik.Y = i
  167.         DoEvents
  168.     Next i
  169. End Sub
  170.  
  171. Sub Close_Click ()
  172.     End
  173. End Sub
  174.  
  175. Sub Form_Load ()
  176.     Set clik = CreateObject("AutoClick.Document")
  177.     clik.ShowWindow
  178. End Sub
  179.  
  180. Sub Form_Unload (Cancel As Integer)
  181.     Set clik = Nothing
  182. End Sub
  183.  
  184. Sub GetAll_Click ()
  185.     X.Text = clik.X
  186.     Y.Text = clik.Y
  187.     Text.Text = clik.Text
  188. End Sub
  189.  
  190. Sub GetPosition_Click ()
  191.     Set pos = clik.position
  192.     X.Text = pos.X
  193.     Y.Text = pos.Y
  194. End Sub
  195.  
  196. Sub RefreshDisplay_Click ()
  197.     clik.RefreshWindow
  198. End Sub
  199.  
  200. Sub SetAll_Click ()
  201.     clik.SetAllProps X.Text, Y.Text, Text.Text
  202. End Sub
  203.  
  204. Sub SetPosition_Click ()
  205.     Set pos = clik.position
  206.     pos.X = X.Text
  207.     pos.Y = Y.Text
  208.     Set clik.position = pos
  209. End Sub
  210.  
  211. Sub SetText_Click ()
  212.     clik.Text = Text.Text
  213. End Sub
  214.  
  215. Sub SetX_Click ()
  216.     clik.X = X.Text
  217. End Sub
  218.  
  219. Sub SetY_Click ()
  220.     clik.Y = Y.Text
  221. End Sub
  222.  
  223.